package com.koron.system.role.service;

import com.koron.bean.app.AppSimpleBean;
import com.koron.bean.base.BaseQueryBean;
import com.koron.bean.system.role.RoleBean;
import com.koron.bean.system.role.RoleJurisdictionBean;
import com.koron.bean.system.role.RoleStaffBean;
import com.koron.bean.system.role.UserOwnJurisdictionBean;
import com.koron.bean.system.staff.vo.EamUser;
import com.koron.system.common.util.MenuTreeVo;
import com.koron.system.role.bean.AppMenuFunDto;
import com.koron.system.role.bean.OrgTypeTreeVo;

import java.util.List;

/**
 * @ClassName RoleService
 * @description
 * @Author zhouj
 * @Date 2021/7/22 14:26
 */
public interface RoleService {

    int insertRole(EamUser user, RoleBean roleBean);

    int updateRole(EamUser user, RoleBean roleBean);

    int deleteRoleById(String id);

    int deleteRoleList(List<String> ids);

    RoleBean querySingleRole(RoleBean roleBean);

    List<RoleBean> queryRoleList(RoleBean roleBean, BaseQueryBean queryBean);

    Long queryRoleListCount(RoleBean roleBean);

    String saveRoleJurisdiction(EamUser user, RoleJurisdictionBean roleJurisdictionBean);

    List<AppSimpleBean> queryAppJurisdiction(String roleId);

    List<OrgTypeTreeVo> queryOrgJurisdiction(String roleId, String appId);

    List<MenuTreeVo> queryMenuJurisdiction(String roleId, String appId);

    List<RoleStaffBean> queryUserJurisdiction(String roleId);

    RoleJurisdictionBean queryAppAllInfoJurisdiction(String roleId, String appId);

    List<AppSimpleBean> queryAppJurisdictionByAccount(String account);

    List<RoleBean> queryUserRole(String account);

    int deleteUserRole(String account, String roleId);

    int deleteUserRoleByUserIds(List<String> ids);

    UserOwnJurisdictionBean queryUserOwnRoleJurisdiction(String account);

    List<AppMenuFunDto> queryUserOwnRoleJurisdictionAll(String account);

    UserOwnJurisdictionBean queryUserOwnRoleJurisdictionWithRoleIds(String account, List<String> preRoleIds);

    int saveUserRole(String account, List<String> roleIds);

}
